</body>
</html>
<input type="hidden" id="member_id" value="{$member->id}" />
<input type="hidden" id="member_money" value="{if $member->id>0}{$member->money}{else}0{/if}" />
{if isset($weixin_sign_package)}
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script>
//*//
var app = '{$app}', act = '{$act}', qrcode = '{if isset($qrcode)}{$qrcode}{/if}',
	title = '{$share_title}',
	desc = '{$share_desc}',
	link = window.location.href,
	imgUrl = '{$share_img}';
link += (window.location.href.indexOf('=')>0?'&':'') + 'reseller={$member->id}';

if(app=='goods' && act=='detail'){
	{if $goods_name}title = '{$goods_name}';{/if}
	{if $goods_desc}desc = '{$goods_desc}';{/if}
	{if $goods_default_pic}imgUrl = '{$goods_default_pic}';{/if}
};
wx.config({
	debug: false,
	appId: "{$weixin_sign_package.appId}",
	timestamp: "{$weixin_sign_package.timestamp}",
	nonceStr: "{$weixin_sign_package.nonceStr}",
	signature: "{$weixin_sign_package.signature}",
	jsApiList: [
		//所有要调用的 API 都要加到这个列表中
		'checkJsApi',
		'onMenuShareTimeline',
		'onMenuShareAppMessage',
		'onMenuShareQQ'
	]
});
wx.ready(function(){
	wx.onMenuShareAppMessage({
		title: title,
		desc: desc,
		link: link,
		imgUrl: imgUrl,
		success: function(res){
			//alert();
		}
	});
	wx.onMenuShareTimeline({
		title: title,
		link: link,
		imgUrl: imgUrl,
		success: function(res){
			//alert('已分享');
		}
	});
	wx.onMenuShareQQ({
		title: title,
		desc: desc,
		link: link,
		imgUrl: imgUrl,
		success: function(res){
			//alert('已分享');
		}
	});
});
//*/
</script>
{/if}